package org.example.skytool.es;

/**
 * @author 22449
 */
public class EsConstarnt {

    public static final String POST_INDEX = "campus-post";
    public static final String POST_CONTENT_DOC = "content";
    public static final String POST_HOT_DOC = "hot";
    public static final String POST_THEME_DOC = "themeId";
    public static final String POST_CREATE_INDEX = "{\n" +
            "  \"mappings\": {\n" +
            "    \"properties\": {\n" +
            "      \"themeId\": {\n" +
            "        \"type\": \"keyword\"\n" +
            "      },\n" +
            "      \"content\": {\n" +
            "        \"type\": \"text\",\n" +
            "        \"analyzer\": \"ik_max_word\"\n" +
            "      },\n" +
            "      \"hot\": {\n" +
            "        \"type\": \"integer\"\n" +
            "      }\n" +
            "    }\n" +
            "  }\n" +
            "}";

    public static final String POST_SEARCH_INDEX = "campus-post-search-completion";
    public static final String POST_SEARCH_CONTENT_DOC = "content";
    public static final String POST_SEARCH_CREATE_INDEX = "{\n" +
            " \"settings\": {\n" +
            "    \"analysis\": {\n" +
            "      \"analyzer\": {\n" +
            "        \"my_analyzer\":{\n" +
            "          \"tokenizer\":\"ik_max_word\",\n" +
            "          \"filter\": \"py\"\n" +
            "        }\n" +
            "      },\n" +
            "    \"filter\": {\n" +
            "      \"py\":{\n" +
            "        \"type\": \"pinyin\",\n" +
            "\t\t    \"keep_full_pinyin\": false,\n" +
            "        \"keep_joined_full_pinyin\": true,\n" +
            "        \"keep_original\": true,\n" +
            "        \"limit_first_letter_length\": 16,\n" +
            "        \"remove_duplicated_term\": true,\n" +
            "        \"none_chinese_pinyin_tokenize\": false\n" +
            "      }\n" +
            "    }\n" +
            "    }\n" +
            " },\n" +
            " \"mappings\": {\n" +
            "   \"properties\": {\n" +
            "     \"content\":{\n" +
            "       \"type\":\"text\",\n" +
            "       \"analyzer\": \"my_analyzer\",\n" +
            "       \"search_analyzer\": \"ik_smart\"\n" +
            "     }\n" +
            "   }\n" +
            " }\n" +
            "}";

}
